package top.ochiamalu.aioj.strategy.favor.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Component;
import top.ochiamalu.aioj.domain.entity.Favor;
import top.ochiamalu.aioj.enums.ThumbTypeEnum;
import top.ochiamalu.aioj.strategy.favor.FavorStrategy;

/**
 * 题目点赞策略
 *
 * @author ochiamalu
 * @date 2025/03/07
 */
@Component
public class QuestionFavorStrategy implements FavorStrategy {

    @Override
    public void buildQueryCondition(LambdaQueryWrapper<Favor> queryWrapper, Long targetId) {
        queryWrapper.eq(Favor::getTargetId, targetId)
                .eq(Favor::getType, ThumbTypeEnum.QUESTION.getValue());
    }
} 